﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Site.Master"
    Inherits="System.Web.Mvc.ViewPage<Model.Information>" %>

<%@ Import Namespace="UI.Helper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Thông tin chung
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%= Utils.IncludeJS(this.Html, "~/Scripts/jquery.validate.min.js")%>
    <!--  start page-heading -->
    <div id="page-heading">
        <h1>
            Cập nhật thông tin chung</h1>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="<%= Utils.ResolveUrl(this.Html, "~/") %>images/admin/shared/side_shadowleft.jpg"
                    width="20" height="300" alt="" />
            </th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;
            </td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="<%= Utils.ResolveUrl(this.Html, "~/") %>images/admin/shared/side_shadowright.jpg"
                    width="20" height="300" alt="" />
            </th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr valign="top">
                            <td>
                                <!--  start step-holder -->
                                <div id="step-holder">
                                    <div class="step-no">
                                    </div>
                                    <div class="step-dark-left">
                                        <a href="">Thông tin chung</a></div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <!--  end step-holder -->
                                <% Html.BeginForm("Index", "Information", new { area = "Admin" }, FormMethod.Post, new { id = "infoForm" }); %>
                                <!-- start id-form -->
                                <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                    <tr>
                                        <th valign="top">
                                        </th>
                                        <td>
                                            <div id="errMessage" style="float: none; color: red; padding-left: .5em; vertical-align: top;
                                                font-weight: bold;">
                                                <%: ViewData[Constants.MESSAGE] ?? "" %>
                                            </div>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Giới thiệu Việt:
                                        </th>
                                        <td>
                                            <%: Html.TextAreaFor(c => c.ViAboutUs, new { id = "ViAboutUs", maxlength = "4000", cols = "50", rows = "4" })%>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Giới thiệu Anh:
                                        </th>
                                        <td>
                                            <%: Html.TextAreaFor(c => c.EnAboutUs, new { id = "EnAboutUs", maxlength = "4000", cols = "50", rows = "4" })%>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Liên hệ Việt:
                                        </th>
                                        <td>
                                            <%: Html.TextAreaFor(c => c.ViContact, new { id = "ViContact", maxlength = "4000", cols = "50", rows = "4" })%>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Liên hệ Anh:
                                        </th>
                                        <td>
                                            <%: Html.TextAreaFor(c => c.EnContact, new { id = "EnContact", maxlength = "4000", cols = "50", rows = "4" })%>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            &nbsp;
                                        </th>
                                        <td valign="top">
                                            <input type="submit" value="" class="form-submit" />
                                            <%--<input type="reset" value="" class="form-reset" />--%>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                                <!-- end id-form  -->
                                <% Html.EndForm(); %>
                            </td>
                            <td>
                                <!--  start related-activities -->
                                <div id="related-activities">
                                    &nbsp;</div>
                                <!-- end related-activities -->
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;
            </td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#infoForm").validate({
                rules:
                {
                    ViAboutUs: { required: true },
                    EnAboutUs: { required: true },
                    ViContact: { required: true },
                    EnContact: { required: true }
                },
                messages:
                {
                    ViAboutUs: { required: 'Hãy nhập giới thiệu tiếng Việt.' },
                    EnAboutUs: { required: 'Hãy nhập giới thiệu tiếng Anh.' },
                    ViContact: { required: 'Hãy nhập liên hệ tiếng Việt.' },
                    EnContact: { required: 'Hãy nhập liên hệ tiếng Anh.' }
                },
                errorElement: "div"
            })
        });
    </script>
</asp:Content>